;; more_tests
;; not idiomatic, just threw this in quickly when there was a bug

(import '(persistent_heap PersistentHeap))
    
(def heap (new PersistentHeap))

(def heap (.insert heap "aaa" 5))
(def heap (.insert heap "bbb" 5))
(def heap (.insert heap "ccc" 5))
(def heap (.insert heap "ddd" 5))
(def heap (.insert heap "eee" 5))
(def heap (.insert heap "fff" 5))
(def heap (.insert heap "ggg" 5))
(def heap (.insert heap "hhh" 5))
(def heap (.insert heap "iii" 5))
(def heap (.insert heap "jjj" 5))
(def heap (.insert heap "kkk" 5))

(def heap (.eagerDelete heap "ddd" 5))
(def heap (.eagerDelete heap "eee" 5))
(def heap (.eagerDelete heap "fff" 5))
(def heap (.eagerDelete heap "ggg" 5))

;(def heap (.lazyDelete heap "ddd" 5))
;(def heap (.lazyDelete heap "eee" 5))
;(def heap (.lazyDelete heap "fff" 5))
;(def heap (.lazyDelete heap "ggg" 5))

(println (.minData heap))

(def heap (.deleteMin heap))
(println (.minData heap))

(def heap (.deleteMin heap))
(println (.minData heap))

(def heap (.deleteMin heap))
(println (.minData heap))

(def heap (.deleteMin heap))
(println (.minData heap))

(def heap (.deleteMin heap))
(println (.minData heap))

(def heap (.deleteMin heap))
(println (.minData heap))

(def heap (.deleteMin heap))

(when (.isEmpty heap) (println "done"))
